import dashboardRequest from '@/utils/dashboardRequest'

// 获取策略管理列表
export const getPolicyList = (params) => dashboardRequest({
  url: '/vm-service/policy/search',
  params
})

// 删除策略
export const delPolicy = (id) => dashboardRequest({
  url: `/vm-service/policy/${id}`
})

// 查看策略详情
export const checkPolicy = (params) => dashboardRequest({
  url: `/vm-service/policy/vmList/${params.policyId}`,
  params
})

// 新增策略
export const addPolicy = (data) => dashboardRequest({
  url: '/vm-service/policy',
  method: 'post',
  data
})

// 修改策略
export const editPolicy = (data) => dashboardRequest({
  url: `/vm-service/policy/${data.policyId}`,
  method: 'put',
  data
})
